Fix F# option date index member selection#4112
Merged
jeremydmiller merged 4 commits intoJasperFx:masterfrom Feb 6, 2026
Merged
Fix F# option date index member selection#4112jeremydmiller merged 4 commits intoJasperFx:masterfrom
jeremydmiller merged 4 commits intoJasperFx:masterfrom
Conversation
…gration-issue Fix F# option date index member selection
Member
|
@nkosi23 I'll look at the LINQ failures tomorrow or Friday |
Contributor
Author
|
@jeremydmiller Sorry about that Jeremy, i've just looked into it, they should be fixed now but i'm not sure you'll be happy with the approach. |
Member
|
There's a helper extension method somewhere in Marten for selectively unwrapping an Expression like that. I'll get caught up w/ you soon |
This was referenced Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
CAST(... as timestamp)/timestamptzin computed index DDL instead of using themt_immutable_*functions, which caused Postgres errors about non-immutable functions in index expressions.Description
src/Marten/StoreOptions.MemberFactory.csadded a guard inValueTypeMemberSource.TryResolveto skip treatingFSharpOption<T>as a generic value type whenTisDateTime,DateTimeOffset,DateOnly, orTimeOnly, by returningfalseearly so the specializedDateTimeMember/DateTimeOffsetMemberlogic is used instead.isSpecialFSharpOptionDateType(Type)to centralize the date/time type check.src/DocumentDbTests/Indexes/computed_indexes.csupdated the testfsharp_date_related_options_indexes_are_createdto call_.RegisterFSharpOptionValueTypes()so the F# option value types are registered during test setup.Testing
fsharp_date_related_options_indexes_are_createdtest was updated to register F# option value types to cover the regression scenario expected to be validated by the test suite.Resolves: #4113